package Enumeration;
/*
 *@Student 张策
 */
public class Main {
    public static void main(String[] args) {
        Season spring = Season.SPRING;
        System.out.println(Season.SPRING.name());//枚举编号的名字
        System.out.println(spring.ordinal());//枚举对象的编号从零开始
        Season[] values = Season.values();//形成枚举对象数组
        for(Season season:values){
            System.out.println(season);
        }
        System.out.println(spring.compareTo(Season.SUMMER));
    }
}

